﻿package mortal.game.view.group.panel
{
    import com.mui.controls.*;
    import com.mui.display.*;
    import mortal.common.global.*;
    import mortal.game.resource.*;
    import mortal.game.view.common.*;

    public class GroupChatBox extends GSprite
    {
        private var _bg:ScaleBitmap;
        private var _txt:GTextFiled;

        public function GroupChatBox()
        {
            return;
        }// end function

        override protected function createDisposedChildrenImpl() : void
        {
            super.createDisposedChildrenImpl();
            this._bg = UIFactory.bg(0, 0, 2, 2, this, ImagesConst.ChatOtherTalkBg);
            this._txt = UIFactory.gTextField("", 15, 12, 230, 55, this, GlobalStyle.textFormatBai);
            this._txt.multiline = true;
            this._txt.wordWrap = true;
            return;
        }// end function

        override protected function disposeImpl(param1:Boolean = true) : void
        {
            this._bg.dispose(param1);
            this._bg = null;
            this._txt.dispose(param1);
            this._txt = null;
            super.disposeImpl(param1);
            return;
        }// end function

        public function set chatTxt(param1:String) : void
        {
            this._txt.text = param1;
            this._bg.x = this._txt.x - 10;
            this._bg.y = this._txt.y - 10;
            this._bg.setSize(this._txt.textWidth + 20, this._txt.textHeight + 20);
            return;
        }// end function

    }
}
